package com.bajiao.common.web.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 表格分页对象
 *
 * @author FanJq
 */
@Data
public class TableDataInfo<T> implements Serializable
{
    private static final long serialVersionUID = 1L;

    /**
     * 总记录数
     */
    private int total;

    /**
     * 列表数据
     */
    private List<T> rows;

    /**
     * 消息状态码
     */
    private int code;

    /**
     * 消息内容
     */
    private String msg;

    public TableDataInfo(){}

    public TableDataInfo(List<T> list,int total)
    {
        this.total = total;
        this.rows = list;
        this.code = 1;
        this.msg = "操作成功！";
    }
}
